//
//  AddressBookTableViewCell.m
//  lsOA
//
//  Created by 蓝水软件 on 16/7/26.
//  Copyright © 2016年 苏州蓝水有限公司. All rights reserved.
//

#import "AddressBookTableViewCell.h"

@implementation AddressBookTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configWithInfoArray:(NSArray *)InfroArray labelArrat:(NSArray *)labelArray index:(NSInteger)row{
    UILabel *label = [[UILabel alloc]init];
    label.text = labelArray[row];
    [self.contentView addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(50);
        make.centerY.equalTo(self.contentView);
        make.width.mas_equalTo(80);
    }];
    UILabel *Infor = [[UILabel alloc]init];
    if ([InfroArray[row] isEqualToString:@""] || InfroArray[row] == nil) {
        Infor.text = @"❌";
    }else{
        Infor.text = InfroArray[row];
    }
    if (row == 1) {
        UIImageView *phone = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"手机"]];
        [self.contentView addSubview:phone];
        [phone mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(label.mas_left).offset(-10);
            make.centerY.equalTo(self.contentView);
            make.size.mas_equalTo(LRLCGSizeMake(25,25));
        }];
    }
    [self.contentView addSubview:Infor];
    [Infor mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(label.mas_right).offset(15);
        make.centerY.equalTo(self.contentView);
    }];
}
@end
